<%= form_tag phieu_saches_path, :method => 'get' do %>
    <%= text_field_tag :search, params[:search] %>
    <%= submit_tag "Search", :name => nil %>
<% end %>

<table>
  <tr>
    <th>Borrowername</th>
    <th>Bookisbn</th>
    <th>Borrowdate</th>
    <th>Returndate</th>
    <th>Status</th>
    <th>Dudedate</th>
    <th>Finecost</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @phieu_saches.each do |phieu_sach| %>
  <tr>
    <td><%= phieu_sach.BorrowerName %></td>
    <td><%= phieu_sach.BookISBN %></td>
    <td><%= phieu_sach.BorrowDate %></td>
    <td><%= phieu_sach.ReturnDate %></td>
    <td><%= phieu_sach.Status %></td>
    <td><%= phieu_sach.DudeDate %></td>
    <td><%= phieu_sach.FineCost %></td>
    <td><%= link_to 'Show', phieu_sach %></td>
    <td><%= link_to 'Edit', edit_phieu_sach_path(phieu_sach) %></td>
    <td><%= link_to 'Destroy', phieu_sach, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Phieu sach', new_phieu_sach_path %>
